package com.tqy.docms.controller;

import com.tqy.docms.entity.Cpfl;
import com.tqy.docms.service.CpflService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class CpflController {
    @Autowired
    private CpflService cpflService;
    /*
    * 查询出所有的产品分类
    * */
    @RequestMapping("/getallCpfl")
    @ResponseBody
    public  List<Cpfl> add(){
        List<Cpfl> cpfls = cpflService.getallCpfl();
        return cpfls;
    }
}
